﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using InteControlSys.ViewModel;

namespace InteControlSys
{
    using System.ComponentModel;
    using System.Windows.Threading;
    using Timer = System.Timers.Timer;

    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class StartWindow : Window
    {
        //private DispatcherTimer dTimer = new DispatcherTimer();
        //private DispatcherTimer cTimer = new DispatcherTimer();

        public StartWindow()
        {
            InitializeComponent();

            (this.DataContext as StartWindowViewModel).startWindow = this;
        }

        public StartWindow(int mode)
        {
            InitializeComponent();
        }

        private void cTimer_Tick(object sender, EventArgs e)
        {
          
            //var mainWin = new MainWindow();
            //var mainWin = new MetroStyleWindow();
            //mainWin.Show();

            //cTimer.Stop();

            //this.Close();
        }


        private void MainWindow_OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            //this.Close();
        }

        private void RegisterBtn_Click(object sender, RoutedEventArgs e)
        {
            this._logonbtn.Visibility = Visibility.Visible;
            //this._registerbtn.Visibility = Visibility.Collapsed;
            this._Register.Visibility = Visibility.Visible;
            this._LogOn.Visibility = Visibility.Collapsed;
        }

        public void LogOnBtn_Click(object sender, RoutedEventArgs e)
        {
            this._logonbtn.Visibility = Visibility.Collapsed;
            //this._registerbtn.Visibility = Visibility.Visible;
            this._Register.Visibility = Visibility.Collapsed;
            this._LogOn.Visibility = Visibility.Visible;
        }
    }
}
